The present invention generally relates to an improvement to a computer system such as a system for debugging and capturing runtime data of a computer program product, and more specifically, to implementing expiring hooks.
New programs created by a user often include one or more inadvertent errors. Locating and removing the errors in a program is generally known in the industry as “debugging” the program, with errors being referred to as “bugs”. Debugging a program can be difficult and time-consuming. In the prior art of debugging a program, a user may first read the program line-by-line to try and locate the errors. Following the flow of a program by reading it line-by-line is difficult, even for a relatively simple program.
Because debugging programs by reading them is so difficult, software debug commands executed by a software debug program may be utilized. Debug commands may be executed on the program and the user may observe the results as an aid to locate and correct any errors. For example, a user may go through the software program to be debugged and the user may insert a breakpoint in the program to halt execution whenever the line on which the breakpoint is set is encountered. The debug commands may then be executed on the user's program. In this example, the program will execute until a breakpoint is encountered. The execution of the program then will be stopped. The user may check register and other values after the breakpoint is encountered in order to evaluate the execution of the user program. This procedure is also very time-consuming when the software to be debugged is more than a few lines of code.
The problem of debugging user programs is magnified when software engineers are required to isolate and solve problems which occur in vast amounts of code with which the engineers have little or no previous experience. Often, standard regression tests written for the code may run successfully, but have a failure when the software is executed with slightly different parameters or environment settings.
A software program typically includes parameters which may be set by a user prior to executing the software program. The software program may execute correctly when a standard set of parameters is utilized, and thus, the standard regression tests may run successfully. The same software program may execute incorrectly when a slightly different set of parameters is utilized. Thus, the software engineer may be faced with a difficult problem which must be solved in a short amount of time.
Further yet, the debugging tools are used for capturing runtime data of the computer program, such as code coverage, number of executions of specific instructions, path frequency, and other such metrics. However, debugging tools use significant overhead to capture such information because the debugging tools have to stop execution of the computer program, capture the information, and resume the computer program again. Performing such operations for each instruction, or multiple instructions in the computer program substantially affect the performance of the computer program.